<h1>MorphGradient</h1>

<p>MorphGradient defines the control points that is used to specify how a 
gradient fill is displayed at the start and end of the shape morphing process. 
Two or more control points are used to define how the colour changes across 
the gradient square.</p>

<table>

<tr>
<th nowrap>Field Name</th>
<th>Type</th>
<th>Size</th>
<th>Description</th>
</tr>

<tr>
<td nowrap valign="top">startRatio</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">8</td>
<td>The location of the control point across the gradient square at the start 
of the morphing process.</td>
</tr>

<tr>
<td nowrap valign="top">endRatio</td>
<td nowrap valign="top">unsigned int</td>
<td nowrap valign="top" align="right">8</td>
<td>The location of the control point across the gradient square at the end of 
the morphing process.</td>
</tr>

<tr>
<td nowrap valign="top">startColor</td>
<td nowrap valign="top">Color</td>
<td nowrap valign="top" align="right">&nbsp;</td>
<td>The colour at the control point at the start of the morphing process.</td>
</tr>

<tr>
<td nowrap valign="top">endColor</td>
<td nowrap valign="top">Color</td>
<td nowrap valign="top" align="right">&nbsp;</td>
<td>The colour at the control point at the end of the morphing process.</td>
</tr>

</table>

<p>The location of the control point is defined by a ratio - a number between 0 
and 255 that specifies the relative location in the square. For Linear Gradient 
Fills a ratio of zero is mapped to the left side of the gradient square and 255 
is mapped to the right side of the square. For Radial Gradient Fills a ratio of 
zero is mapped to the centre of the gradient square and 255 is mapped to the 
edge of the largest circle that fits inside the gradient square.</p>

<p>MorphGradients are only used in DefineMorphShape which support 
transparent colours so values for all the colour channels must be specified in 
the Colors used.</p>

<p>When the Flash Player displays the gradient control points they are sorted 
by the ratio, with the Gradient with the smallest ratio value displayed 
first.</p>

<h2>History</h2>

<p>MorphGradient represents the MorphGradientRecord structure from 
the Macromedia Flash (SWF) File Format Specification. Shape morphing was 
introduced in Flash 3.</p>
